<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>监听事件页</title>
	</head>

	<body>
		<div>
			loading...
		</div>
	</body>
	<script type="text/javascript">
		apiready = function() {
			var UILoading = api.require('UILoading');
			UILoading.flower({
				center: {
					x: api.winWidth / 2.0,
					y: api.winHeight / 2.0
				},
				size: 30,
				fixed: true
			}, function(ret) {
				console.log(JSON.stringify(ret));
			});
			//			var fid = api.pageParam;
			//			var user_id = fid.user_id;
			//			var room_name = fid.room_name;
			//			var sid = fid.sid;
			//监听来自native的事件
			api.addEventListener({
				name: 'vi'
			}, function(ret) {
				api.closeWidget({
//					id: 'A00000001',
//					retData: {
//						name: 'closeWidget'
//					},
					animation: {
						type: 'fade',
						subType: 'from_bottom',
						duration: 300
					}
				});
			});
		}
	</script>

</html>